Skip to main content

Scatter Plot

df.plot(kind='scatter', x=data_col, y=data_col)

Create a scatter plot using a DataFrame.

Input:
kind : string
To create a scatter plot, use kind='scatter'
x : label
Column for horizontal coordinates of each point.
y : label
Column for vertical coordinates of each point..
Returns:
plot - Matplotlib plot created using parameters.
Return Type:
Matplotlib plot

pets.plot(kind='scatter', x='Age', y='Weight')

Scatter plot example 1